import {Component, Input, OnInit} from '@angular/core';
import {ControlService} from '../../service/control.service';

@Component({
  selector: 'app-button',
  templateUrl: './button.component.html',
  styleUrls: ['./button.component.css']
})
export class ButtonComponent implements OnInit {

  @Input() id;
  @Input() label;

  constructor(private functionService: ControlService) { }

  ngOnInit() {
  }

  onClicked(e){
    this.functionService.call(this.id);
  }
}
